1. Field of the Invention
This invention relates to graphics processors. In particular, the invention relates to memory manager for a graphics processor.
2. Description of Related Art
Advances in graphics design have provided many enhanced graphic performance in a general purpose computing environment. In a general purpose computing environment, an operating system (OS) provides a useful and efficient platform for the users and applications programs. One particularly important function in an OS is the management of hardware resources, especially the use of memory. Due to the complexity of memory architecture and usage in a high performance processor environment, memory management has become a central objective in modern OS design. However, a general-purpose OS cannot provide direct memory management for graphics applications programs because of the specialized nature of the graphics processor.
A modern graphics processor typically has the ability to access the system memory for graphic usage in addition to its local memory. Therefore, the problem of managing memories for a graphics processor in a general purpose computing environment has become difficult. For example, most graphic applications are memory intensive. To enhance graphic performance, graphic memory is preferably organized in a contiguous fashion. Scattered memory blocks require additional operations resulting in degraded performance. Therefore, an important feature of a memory management scheme is to convert the physically non-contiguous pages of physical system memory into contiguous memory for use by the graphics processor. In addition, other operations involving memory allocation, de-allocation, and configuration of interfacing chipset are necessary to provide a systematic and convenient facility to the device drivers for use by the applications programs.
Therefore, there is a need in the technology to provide a simple and efficient method to manage memory for a graphics processor.
In one embodiment, the present invention relates to a method for managing memory used by a device driver in an operating system. The method comprises: (i) configuring a chipset to set up a mapping table for memory address translation, (ii) allocating a device memory in response to a request by the device driver, and (iii) mapping non-contiguous system memory to contiguous device memory using the mapping table.